package chapte06.E14;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Set;

public class E14 {
    public static void main(String[] args) {
        HashMap map = new HashMap();
        map.put("2020304010656","高都不错");
        map.put("2020040106501","收到");
        map.put("202304010602","哇塞");
        System.out.println(map);
        // 取出 key值队列 用来迭代
        Set ks = map.keySet();
        Iterator it = ks.iterator();// 抽出的key队列有迭代器
        while (it.hasNext()){
            Object obj = it.next();
            System.out.println(obj);
            System.out.println("学号"+obj+":"+ map.get(obj));
        }
    }
}
